﻿using System;
using System.Windows.Data;

namespace MedLink2011.Views.Patients.Controls.FirstLook.Converters
{
    public class SpeakerToImageConverter : IValueConverter
    {

        #region IValueConverter Members

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            SpeakersList speakers = new SpeakersList();
            foreach (Speaker speaker in speakers)
            {
                if (speaker.DisplayName.Equals(value))
                {
                     return speaker.Image;
                }
            }
            return null;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
